from django.conf import settings

BASE_URI = "http://axschema.org/"

URI_GROUPS = [
    {'name':'Name', 'URI':'namePerson/'},
    {'name':'Work', 'URI':'company/'},
    {'name':'Date of Birth', 'URI':'birthDate/'},
    {'name':'Telephone', 'URI':'contact/phone/'},
    {'name':'Address', 'URI':'contact/'},
    {'name':'Email', 'URI':'contact/email'}
]

URI_GROUPS_DICT = {}
for group in URI_GROUPS:
    URI_GROUPS_DICT[group['name']] = group
    
ALIAS = {
    "type_uri":"%s%sfriendly" % (BASE_URI, URI_GROUPS_DICT['Name']['URI']),
    "alias":"alias",
    "required":True,
    "count":1
}

EMAIL = {
    "type_uri":"%s%s" % (BASE_URI, URI_GROUPS_DICT['Email']['URI']),
    "alias":"email",
    "required":True,
    "count":1
}

OPENID_PAPE = getattr(settings, 'OPENID_PAPE', False) or False
OPENID_SREG = getattr(settings, 'OPENID_SREG', []) or []
OPENID_AX = getattr(settings, 'OPENID_AX', []) or [ALIAS, EMAIL]